/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exercises.day03.pt02;


import java.sql.SQLException;

/**
 *
 * @author Student
 * 
 * b. A module which will allow users to new books to the database;
 */
public class Book {
    //(BID, TITLE, BOOKDESC, AUNAME, BOOKPRICE) 

    private String id;
    private String title;
    private String description;
    private String authorName;
    private int price;
   

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

   
    public Book(String id, String title, String authorName, int price) throws ClassNotFoundException, SQLException {
        this.id = id;
        this.title = title;
        this.authorName = authorName;
        this.price = price;
        this.description = "";

    }

    public Book(String id, String title, String description, String authorName, int price) throws SQLException, ClassNotFoundException {
        this.id = id;
        this.title = title;
        this.description = description;
        this.authorName = authorName;
        this.price = price;

    }

   

    @Override
    public String toString() {
        return "Book{" + "id=" + id + ", title=" + title + ", description=" + description + ", authorName=" + authorName + ", price=" + price + '}';
    }
}
